﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="SendRequest.aspx.cs" Inherits="Pages_SendRequest" %>

<%@ MasterType VirtualPath="~/Site.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server">
    <asp:Panel ID="pnShow" runat="server" Width="100%">
        <div id="content-product">
        <div class="header-product">
            <div class="header-product-left">
            </div>
            <div class="header-product-center">
             Gởi lời mời sử dụng ứng dụng
             </div> 
            <div class="header-product-right">
            </div>
        </div>
        <center>
            <script src="http://connect.facebook.net/en_US/all.js"></script>            
            
            <br>
            </br>
            <br></br>
            <p>
                <input type="button" onclick="sendRequestToRecipients(); return false;" value="Gởi yêu cầu tới" class="fb_invite_button"/>
                <input type="text" value="User ID" name="user_ids" />
            </p>
            <p>
                <input type="button" onclick="sendRequestViaMultiFriendSelector(); return false;"
                    value="Gởi yêu cầu đến những người bạn" class="fb_invite_button"/>
            </p>
            <script>
//                  FB.init({
//                    appId  : '290146691073914',
//                    frictionlessRequests: true,
//                  });

                  function sendRequestToRecipients() {
                    var user_ids = document.getElementsByName("user_ids")[0].value;
                    FB.ui({method: 'apprequests',
                      message: 'My Great Request',
                      to: user_ids, 
                    }, requestCallback);
                  }

                  function sendRequestViaMultiFriendSelector() {
                    FB.ui({method: 'apprequests',
                      message: 'My Great Request'
                    }, requestCallback);
                  }
      
                  function requestCallback(response) {
                    // Handle callback here
                  }
            </script>
        </center>
    </asp:Panel>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="footer" runat="Server">
</asp:Content>
